<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../../../../style.css" type="text/css" media="screen">
<link rel="stylesheet" href="../../../../../print.css" type="text/css" media="print">
<meta content="GeneticEngine,com.suckatmath.machinelearning.genetic.core.GeneticEngine,ROULETTE,TOURNAMENT,numNewPerGeneration,compareFitness,getAvgPopFitness,getPopulation,nextGeneration,randomPopulation,setCarryOverNum,setCrossoverNumParents,setCrossoverNumPoints,setFactory,setMutateProbability,setNumNewPerGeneration,setPopulation,setSelectionMode,setTournamentComparator,useCrossover,useMutate" name="keywords">
<title>com.suckatmath.machinelearning.genetic.core.GeneticEngine</title>
</head>
<body>
<script type="text/javascript" language="javascript" src="../../../../../asdoc.js"></script><script type="text/javascript" language="javascript" src="../../../../../cookies.js"></script><script type="text/javascript" language="javascript">
<!--
				asdocTitle = 'GeneticEngine - API Documentation';
				var baseRef = '../../../../../';
				window.onload = configPage;
			--></script>
<table style="display:none" id="titleTable" cellspacing="0" cellpadding="0" class="titleTable">
<tr>
<td align="left" class="titleTableTitle">Geneas</td><td align="right" class="titleTableTopNav"><a onclick="loadClassListFrame('../../../../../all-classes.html')" href="../../../../../package-summary.html">All&nbsp;Packages</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../../../all-classes.html')" href="../../../../../class-summary.html">All&nbsp;Classes</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../../../index-list.html')" href="../../../../../all-index-A.html">Index</a>&nbsp;|&nbsp;<a href="../../../../../index.html?com/suckatmath/machinelearning/genetic/core/GeneticEngine.html&amp;com/suckatmath/machinelearning/genetic/core/class-list.html" id="framesLink1">Frames</a><a onclick="parent.location=document.location" href="" style="display:none" id="noFramesLink1">No&nbsp;Frames</a></td><td rowspan="3" align="right" class="titleTableLogo"><img alt="Adobe Logo" title="Adobe Logo" class="logoImage" src="../../../../../images/logo.jpg"></td>
</tr>
<tr class="titleTableRow2">
<td align="left" id="subTitle" class="titleTableSubTitle">Class&nbsp;GeneticEngine</td><td align="right" id="subNav" class="titleTableSubNav"><a href="#propertySummary">Properties</a>&nbsp;| <a href="#methodSummary">Methods</a>&nbsp;| <a href="#constantSummary">Constants</a></td>
</tr>
<tr class="titleTableRow3">
<td colspan="2">&nbsp;</td>
</tr>
</table>
<script type="text/javascript" language="javascript">
<!--
if (!isEclipse() || window.name != ECLIPSE_FRAME_NAME) {titleBar_setSubTitle("Class GeneticEngine"); titleBar_setSubNav(true,true,false,false,false,false,true,false,false,false,false,false,false,false);}
--></script>
<div class="MainContent">
<table cellspacing="0" cellpadding="0" class="classHeaderTable">
<tr>
<td class="classHeaderTableLabel">Package</td><td><a onclick="javascript:loadClassListFrame('class-list.html')" href="package-detail.html">com.suckatmath.machinelearning.genetic.core</a></td>
</tr>
<tr>
<td class="classHeaderTableLabel">Class</td><td class="classSignature">public class GeneticEngine</td>
</tr>
<tr>
<td class="classHeaderTableLabel">Implements</td><td><a href="EvolvableComparator.html">EvolvableComparator</a></td>
</tr>
</table>
<p></p>
 performs actual genetic algorithms
 <p></p>
<br>
<hr>
</div>
<a name="propertySummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Properties</div>
<table id="summaryTableProperty" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Property</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#numNewPerGeneration">numNewPerGeneration</a> : int = 1<div class="summaryTableDescription">
   Number of new random genomes per generation.</div>
</td><td class="summaryTableOwnerCol">GeneticEngine</td>
</tr>
</table>
</div>
<a name="methodSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Methods</div>
<table id="summaryTableMethod" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Method</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#GeneticEngine()">GeneticEngine</a>(f:<a href="EvolvableFactory.html">EvolvableFactory</a>, mutate:Boolean = true, crossover:Boolean = true, npg:int = 1, mprob:Number = 0.5, cparents:int = 2, ccross:int = 1)</div>
<div class="summaryTableDescription">
   new engine constructor
   </div>
</td><td class="summaryTableOwnerCol">GeneticEngine</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#compareFitness()">compareFitness</a>(a:<a href="Evolvable.html">Evolvable</a>, b:<a href="Evolvable.html">Evolvable</a>):int</div>
<div class="summaryTableDescription">
   Used both in ROULETTE and as default EvolvableComparator function for TOURNAMENT selection
   </div>
</td><td class="summaryTableOwnerCol">GeneticEngine</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#getAvgPopFitness()">getAvgPopFitness</a>():Number</div>
<div class="summaryTableDescription">
   return the average fitness of the population.</div>
</td><td class="summaryTableOwnerCol">GeneticEngine</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#getPopulation()">getPopulation</a>():Array</div>
<div class="summaryTableDescription">
   gets population.</div>
</td><td class="summaryTableOwnerCol">GeneticEngine</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#nextGeneration()">nextGeneration</a>():void</div>
<div class="summaryTableDescription">
   main work method.</div>
</td><td class="summaryTableOwnerCol">GeneticEngine</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#randomPopulation()">randomPopulation</a>(psize:int):void</div>
<div class="summaryTableDescription">
   generate a new population of psize.</div>
</td><td class="summaryTableOwnerCol">GeneticEngine</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#setCarryOverNum()">setCarryOverNum</a>(n:int):void</div>
<div class="summaryTableDescription">
   how many of the fittest of previous generation to put in new pop.</div>
</td><td class="summaryTableOwnerCol">GeneticEngine</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#setCrossoverNumParents()">setCrossoverNumParents</a>(n:int):void</div>
<div class="summaryTableDescription">
   set how many parents to use for crossover - should be <= number of crossover points +1
   </div>
</td><td class="summaryTableOwnerCol">GeneticEngine</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#setCrossoverNumPoints()">setCrossoverNumPoints</a>(n:int):void</div>
<div class="summaryTableDescription">
   set number of crossover points
   </div>
</td><td class="summaryTableOwnerCol">GeneticEngine</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#setFactory()">setFactory</a>(fac:<a href="EvolvableFactory.html">EvolvableFactory</a>):void</div>
<div class="summaryTableDescription">
   set EvolvableFactory to use to create new Evolvables
   </div>
</td><td class="summaryTableOwnerCol">GeneticEngine</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#setMutateProbability()">setMutateProbability</a>(n:Number):void</div>
<div class="summaryTableDescription">
   set probability of mutation in generating new individuals
   </div>
</td><td class="summaryTableOwnerCol">GeneticEngine</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#setNumNewPerGeneration()">setNumNewPerGeneration</a>(n:int):void</div>
<div class="summaryTableDescription">
   set number of new random individuals per generation.</div>
</td><td class="summaryTableOwnerCol">GeneticEngine</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#setPopulation()">setPopulation</a>(pop:Array):void</div>
<div class="summaryTableDescription">
   set population to array of Evolvables
   </div>
</td><td class="summaryTableOwnerCol">GeneticEngine</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#setSelectionMode()">setSelectionMode</a>(s:int):void</div>
<div class="summaryTableDescription">
   set selectionMode to ROULETTE or TOURNAMENT
   </div>
</td><td class="summaryTableOwnerCol">GeneticEngine</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#setTournamentComparator()">setTournamentComparator</a>(e:<a href="EvolvableComparator.html">EvolvableComparator</a>):void</div>
<div class="summaryTableDescription">
   set EvolvableCOmparator to use during TOURNAMENT selection
   </div>
</td><td class="summaryTableOwnerCol">GeneticEngine</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#useCrossover()">useCrossover</a>(c:Boolean):void</div>
<div class="summaryTableDescription">
   set whether to use crossover in generating new individuals
   </div>
</td><td class="summaryTableOwnerCol">GeneticEngine</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#useMutate()">useMutate</a>(m:Boolean):void</div>
<div class="summaryTableDescription">
   set whether to use mutation in generating new individuals
   </div>
</td><td class="summaryTableOwnerCol">GeneticEngine</td>
</tr>
</table>
</div>
<a name="constantSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Constants</div>
<table id="summaryTableConstant" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Constant</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#ROULETTE">ROULETTE</a> : int = 1<div class="summaryTableDescription">[static]
   constant for ROULETTE selection : proportional selection.</div>
</td><td class="summaryTableOwnerCol">GeneticEngine</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#TOURNAMENT">TOURNAMENT</a> : int = 2<div class="summaryTableDescription">[static]
   constant for TOURNAMENT selection 
   </div>
</td><td class="summaryTableOwnerCol">GeneticEngine</td>
</tr>
</table>
</div>
<script type="text/javascript" language="javascript">
<!--
showHideInherited();
--></script>
<div class="MainContent">
<a name="propertyDetail"></a>
<div class="detailSectionHeader">Property detail</div>
<a name="numNewPerGeneration"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">numNewPerGeneration</td><td class="detailHeaderType">property</td>
</tr>
</table>
<div class="detailBody">
<code>public var numNewPerGeneration:int = 1</code><p>
   Number of new random genomes per generation.
   </p></div>
<a name="constructorDetail"></a>
<div class="detailSectionHeader">Constructor detail</div>
<a name="GeneticEngine()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">GeneticEngine</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">constructor</td>
</tr>
</table>
<div class="detailBody">
<code>public function GeneticEngine(f:<a href="EvolvableFactory.html">EvolvableFactory</a>, mutate:Boolean = true, crossover:Boolean = true, npg:int = 1, mprob:Number = 0.5, cparents:int = 2, ccross:int = 1)</code><p>
   new engine constructor
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">f</span>:<a href="EvolvableFactory.html">EvolvableFactory</a></code> &mdash; EvolvableFactory to generate new Evolvables from Genomes
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">mutate</span>:Boolean</code> (default = <code>true</code>)<code></code> &mdash; Boolean whether to use mutation
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">crossover</span>:Boolean</code> (default = <code>true</code>)<code></code> &mdash; Boolean whether to use crossover
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">npg</span>:int</code> (default = <code>1</code>)<code></code> &mdash; int number of new random individuals per generation
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">mprob</span>:Number</code> (default = <code>0.5</code>)<code></code> &mdash; Number probablity of mutation
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">cparents</span>:int</code> (default = <code>2</code>)<code></code> &mdash; int Number of parents to use for crossover
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">ccross</span>:int</code> (default = <code>1</code>)<code></code> &mdash; int Number of points to cross over in crossover operation
   </td>
</tr>
</table>
</div>
<a name="methodDetail"></a>
<div class="detailSectionHeader">Method detail</div>
<a name="compareFitness()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">compareFitness</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td>
</tr>
</table>
<div class="detailBody">
<code>public function compareFitness(a:<a href="Evolvable.html">Evolvable</a>, b:<a href="Evolvable.html">Evolvable</a>):int</code><p>
   Used both in ROULETTE and as default EvolvableComparator function for TOURNAMENT selection
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">a</span>:<a href="Evolvable.html">Evolvable</a></code></td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">b</span>:<a href="Evolvable.html">Evolvable</a></code></td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>int</code></td>
</tr>
</table>
</div>
<a name="getAvgPopFitness()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">getAvgPopFitness</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function getAvgPopFitness():Number</code><p>
   return the average fitness of the population.
   This may be an EXPENSIVE operation if getFitness is expensive
   </p><p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Number</code></td>
</tr>
</table>
</div>
<a name="getPopulation()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">getPopulation</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function getPopulation():Array</code><p>
   gets population.
   </p><p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Array</code></td>
</tr>
</table>
</div>
<a name="nextGeneration()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">nextGeneration</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function nextGeneration():void</code><p>
   main work method.  Calls to this will change the population array.
   </p></div>
<a name="randomPopulation()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">randomPopulation</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function randomPopulation(psize:int):void</code><p>
   generate a new population of psize.  OR if population is already an existing array, replace it with an array of the same size
   which is full of random individuals
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">psize</span>:int</code> &mdash; int
   </td>
</tr>
</table>
</div>
<a name="setCarryOverNum()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">setCarryOverNum</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function setCarryOverNum(n:int):void</code><p>
   how many of the fittest of previous generation to put in new pop.  Not used in TOURNAMENT selection
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">n</span>:int</code></td>
</tr>
</table>
</div>
<a name="setCrossoverNumParents()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">setCrossoverNumParents</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function setCrossoverNumParents(n:int):void</code><p>
   set how many parents to use for crossover - should be <= number of crossover points +1
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">n</span>:int</code></td>
</tr>
</table>
</div>
<a name="setCrossoverNumPoints()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">setCrossoverNumPoints</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function setCrossoverNumPoints(n:int):void</code><p>
   set number of crossover points
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">n</span>:int</code></td>
</tr>
</table>
</div>
<a name="setFactory()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">setFactory</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function setFactory(fac:<a href="EvolvableFactory.html">EvolvableFactory</a>):void</code><p>
   set EvolvableFactory to use to create new Evolvables
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">fac</span>:<a href="EvolvableFactory.html">EvolvableFactory</a></code></td>
</tr>
</table>
</div>
<a name="setMutateProbability()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">setMutateProbability</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function setMutateProbability(n:Number):void</code><p>
   set probability of mutation in generating new individuals
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">n</span>:Number</code></td>
</tr>
</table>
</div>
<a name="setNumNewPerGeneration()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">setNumNewPerGeneration</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function setNumNewPerGeneration(n:int):void</code><p>
   set number of new random individuals per generation.  1 or 0 usually.
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">n</span>:int</code></td>
</tr>
</table>
</div>
<a name="setPopulation()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">setPopulation</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function setPopulation(pop:Array):void</code><p>
   set population to array of Evolvables
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">pop</span>:Array</code></td>
</tr>
</table>
</div>
<a name="setSelectionMode()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">setSelectionMode</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function setSelectionMode(s:int):void</code><p>
   set selectionMode to ROULETTE or TOURNAMENT
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">s</span>:int</code></td>
</tr>
</table>
</div>
<a name="setTournamentComparator()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">setTournamentComparator</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function setTournamentComparator(e:<a href="EvolvableComparator.html">EvolvableComparator</a>):void</code><p>
   set EvolvableCOmparator to use during TOURNAMENT selection
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">e</span>:<a href="EvolvableComparator.html">EvolvableComparator</a></code></td>
</tr>
</table>
</div>
<a name="useCrossover()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">useCrossover</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function useCrossover(c:Boolean):void</code><p>
   set whether to use crossover in generating new individuals
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">c</span>:Boolean</code></td>
</tr>
</table>
</div>
<a name="useMutate()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">useMutate</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function useMutate(m:Boolean):void</code><p>
   set whether to use mutation in generating new individuals
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">m</span>:Boolean</code></td>
</tr>
</table>
</div>
<a name="constantDetail"></a>
<div class="detailSectionHeader">Constant detail</div>
<a name="ROULETTE"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">ROULETTE</td><td class="detailHeaderType">constant</td>
</tr>
</table>
<div class="detailBody">
<code>public static const ROULETTE:int = 1</code><p>
   constant for ROULETTE selection : proportional selection.  This is the default selection mode
   </p></div>
<a name="TOURNAMENT"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">TOURNAMENT</td><td class="detailHeaderType">constant</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static const TOURNAMENT:int = 2</code><p>
   constant for TOURNAMENT selection 
   </p></div>
<br>
<br>
<hr>
<br>
<p></p>
<center class="copyright"> 
</center>
</div>
</body>
</html>
<!-- -->
